Component({
  mixins: [],
  data: {
    toastVisible: false,
    toastMessage: {
      message: '恭喜获得20个租币',
      description: '阅读信息',
      money: 20
    }
  },
  props: {},
  didMount() { },
  didUpdate() { },
  didUnmount() { },
  ref() {
    return {
      show: (toastMessage) => this.showToast(toastMessage)
    };
  },
  methods: {
    showToast(toastMessage) {
      this.setData({
        message: toastMessage,
        toastVisible: true
      })

      setTimeout(() => {
        this.setData({
          toastVisible: false
        })
      }, 2000)
    }
  },
});
